function addMethod(obj, name, fn) {
    return obj.prototype[name] = fn;
}
var rMouseEvent = /mouse/ig,
    rKeyBoard = /key/ig;
function Event(original) {
    this.init = function () {
        this.originalEvent = original;
        var type = this.type = original.type;
        if (rMouseEvent.test(type)) {
            return new MouseEvent(original);
        } else if (rKeyBoard.test(type)) {
            return new KeyBoardEvent(original);
        } else {
            return new Event(original);
        }
    };
}
Event.prototype = {
    preventDefault:function () {
        this.originalEvent.preventDefault();
    },
    stopPropagation:function () {
        this.originalEvent.stopPropagation();
    }
};
function MouseEvent(original) {
    this.base = Event;
    this.base.call(this, original);
    MouseEvent.prototype = new Event;
}
addMethod(MouseEvent, 'pageX', function () {
});
addMethod(MouseEvent, 'pageY', function () {
});
function KeyBoardEvent(original) {
    this.base = Event;
    this.base.call(this, original);
    KeyBoardEvent.prototype = new Event;
}
addMethod(KeyBoardEvent, 'shiftKey', function () {
});
addMethod(KeyBoardEvent, 'ctrlKey', function () {
});
function WheelEvent(original) {
    this.base = Event;
    this.base.call(this, original);
    WheelEvent.prototype = new Event;
}
addMethod(WheelEvent, 'whichData', function () {
});
